﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xtensive.Storage;
using Xtensive.Integrity.Aspects.Constraints;

namespace SMS.Core.Model.Data
{
    class Item : Entity
    {
        [Key, Field]
        public int item_no { get; private set; }

        [Field]
        public EntitySet<Motorcycle_part> motorcycle_parts { get; set; }

        // TODO: Unique unsaon ug pa-unique?!?!?!!
        [Key, Field(Length = 30)]
        public string item_code { get; private set; }//dili ni sure? sa private set

        [Field(Length = 50)]
        public string type { get; set; }

        [Field(Length = 100)]
        public string description { get; set; }

        //not sure sa precision... price man gud dri
        [Field(Precision=2), RangeConstraint(Min = 0)]
        public decimal unit_price { get; set; }

        //again price nasad diri.. not sure if precision ang gamit
        [Field(Precision=2), RangeConstraint(Min = 0)]
        public decimal retail_price { get; set; }

        [Field(Length = 100)]
        public string remarks { get; set; }


    }
}
